//
//  Target_SouFunJRAPP.m
//  SouFunJRAPP
//
//  Created by 许博 on 16/5/20.
//  Copyright © 2016年 许博. All rights reserved.
//

#import "Target_SouFunJRAPP.h"
#import "SouFunJRController.h"

#import "SouFunJsonData.h"
@interface Target_SouFunJRAPP ()

@end

@implementation Target_SouFunJRAPP

- (UIViewController *)Action_nativeFetchSouFunJRController:(NSDictionary *)params {
    SouFunJRController *vc = [[SouFunJRController alloc] initWithControllerName:@"SouFunJRController"];
    vc.titleLabel.text = params[@"key"];
    return  vc;
}

- (id)Action_nativePresentResult:(NSDictionary *)params {
    SouFunJRController *vc = [[SouFunJRController alloc] initWithControllerName:@"SouFunJRController"];
    
    
    [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:vc animated:YES completion:nil];
    //    NSLog(@"%@",params[@"num1"]);
    //    NSLog(@"%@",params[@"num2"]);
    
    
    vc.Num1Txt.text = params[@"num1"];
    vc.Num2Txt.text = params[@"num2"];
    // 注意调用顺序：需要深入了解下代码创建和xib创建控制器的生命周期，各个方法的调用顺序，该在哪里写什么代码，基础知识啊。。。哎。。
    return nil;
}



- (id)Action_nativePresentResultWithBlock:(NSDictionary *)params {
    SouFunJRController *vc = [[SouFunJRController alloc] initWithControllerName:@"SouFunJRController"];
    [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:vc animated:YES completion:nil];
    [SouFunJsonData dataListWithSucess:params[@"block"] error:nil];
    
    return nil;
}


@end
